package com.cw.jeeyt.common.enums;

import java.util.Arrays;

import org.apache.poi.ss.usermodel.IndexedColors;

/**
 * 模块编号
 *
 * @author chenw
 * @version $$Id: EnumModuleCode.java, v 0.1 2018/9/19 上午11:14 chenw Exp $$
 */
public enum EnumDocColorStyle {

    /** 未知模块 **/
    X1("X1", IndexedColors.AQUA.getIndex()),
    X2("X2", IndexedColors.AUTOMATIC.getIndex()),
    X3("X3", IndexedColors.BLUE.getIndex()),
    X4("X4", IndexedColors.BLUE_GREY.getIndex()),
    X5("X5", IndexedColors.BRIGHT_GREEN.getIndex()),
    X6("X6", IndexedColors.BROWN.getIndex()),
    X7("X7", IndexedColors.CORAL.getIndex()),
    X8("X8", IndexedColors.CORNFLOWER_BLUE.getIndex()),
    X9("X9", IndexedColors.DARK_BLUE.getIndex()),
    X10("X10", IndexedColors.DARK_GREEN.getIndex()),
    X11("X11", IndexedColors.DARK_RED.getIndex()),
    X12("X12", IndexedColors.DARK_TEAL.getIndex()),
    X13("X13", IndexedColors.DARK_YELLOW.getIndex()),
    X14("X14", IndexedColors.GOLD.getIndex()),
    X15("X15", IndexedColors.GREEN.getIndex()),
    X16("X16", IndexedColors.GREY_25_PERCENT.getIndex()),
    X17("X17", IndexedColors.GREY_40_PERCENT.getIndex()),
    X18("X18", IndexedColors.GREY_50_PERCENT.getIndex()),
    X19("X19", IndexedColors.GREY_80_PERCENT.getIndex()),
    X20("X20", IndexedColors.INDIGO.getIndex()),
    X21("X21", IndexedColors.LAVENDER.getIndex()),
    X22("X22", IndexedColors.LEMON_CHIFFON.getIndex()),
    X23("X23", IndexedColors.LIGHT_BLUE.getIndex()),
    X24("X24", IndexedColors.LEMON_CHIFFON.getIndex()),
    X25("X25", IndexedColors.LIGHT_BLUE.getIndex()),
    X26("X26", IndexedColors.LIGHT_CORNFLOWER_BLUE.getIndex()),
    X27("X27", IndexedColors.LIGHT_GREEN.getIndex()),
    X28("X28", IndexedColors.LIGHT_ORANGE.getIndex()),
    X29("X29", IndexedColors.LIGHT_TURQUOISE.getIndex()),
    X30("X30", IndexedColors.LIGHT_YELLOW.getIndex()),
    X31("X31", IndexedColors.LIME.getIndex()),
    X32("X32", IndexedColors.MAROON.getIndex()),
    X33("X33", IndexedColors.OLIVE_GREEN.getIndex()),
    X34("X34", IndexedColors.ORANGE.getIndex()),
    X35("X35", IndexedColors.ORCHID.getIndex()),
    X36("X36", IndexedColors.PALE_BLUE.getIndex()),
    X37("X37", IndexedColors.PINK.getIndex()),
    X38("X38", IndexedColors.PLUM.getIndex()),
    X39("X39", IndexedColors.RED.getIndex()),
    X40("X40", IndexedColors.ROSE.getIndex()),
    X41("X41", IndexedColors.ROYAL_BLUE.getIndex()),
    X42("X42", IndexedColors.SEA_GREEN.getIndex()),
    X43("X43", IndexedColors.SKY_BLUE.getIndex()),
    X44("X44", IndexedColors.TAN.getIndex()),
    X45("X45", IndexedColors.TEAL.getIndex()),
    X46("X46", IndexedColors.TURQUOISE.getIndex()),
    X47("X47", IndexedColors.VIOLET.getIndex()),
    X48("X48", IndexedColors.WHITE.getIndex()),
    X49("X49", IndexedColors.YELLOW.getIndex());

    /** 状态码 **/
    private String code;
    /** 状态描述 **/
    private short description;

    EnumDocColorStyle(String code, short description) {
        this.code = code;
        this.description = description;
    }

    public static EnumDocColorStyle find(String code) {
        return Arrays.stream(EnumDocColorStyle.values()).filter(input -> input.getCode().equals(code)).findFirst().orElse(
            null);
    }

    public String getCode() {
        return code;
    }

    public short getDescription() {
        return description;
    }
}
